import request from '@/utils/request'

export default {
    //预约列表
    getReserveList(current,limit,searchObj){
        return request({
            url: `/admin/hosp/reserve/findPageReserve/${current}/${limit}`,
            method: 'post',
            data: searchObj //使用json
          })
    },

    //删除预约
deleteReserve(id) {
    return request ({
      url: `/admin/hosp/reserve/${id}`,
      method: 'delete'
    })
  },

  //批量删除
  batchRemoveReserve(idList) {
    return request ({
      url: `/admin/hosp/reserve/batchRemove`,
      method: 'delete',
      data: idList
    })
  },
//锁定和取消锁定
lockReserve(id,status) {
  return request ({
    url: `/admin/hosp/reserve/lockReserve/${id}/${status}`,
    method: 'put'
  })
},  
//预约保存
saveReserve(reserve) {
  return request ({
    url: `/admin/hosp/reserve/saveReserve`,
    method: 'post',
    data: reserve
  })
},
//预约挂号id查询
getReserve(id) {
  return request ({
    url: `/admin/hosp/reserve/getReserve/${id}`,
    method: 'get'
  })
},
//修改预约信息
updateReserve(reserve) {
  return request ({
    url: `/admin/hosp/reserve/updateReserve`,
    method: 'post',
    data: reserve
  })
},

//预约挂号列表
getReserveDiagnosisList(current,limit,searchObj){
  return request({
      url: `/admin/hosp/reserve/findPageReserveDiagnosisAdmin/${current}/${limit}`,
      method: 'post',
      data: searchObj //使用json
    })
},

}
